import socket
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
address = ('122.246.0.254', 45117)
client_socket.connect(address)
while True:
    message = input('请输入要发送给汪子涵的消息: ')
    client_socket.send(message.encode('utf-8'))
    data = client_socket.recv(1024).decode('utf-8')
    if not data:
        break
    print('服务器说: {}'.format(data))
client_socket.close()